package cn.stylefeng.guns.modular.business.frequency.financetransport.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.financetransport.entity.FinanceTransport;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单财务信息表 Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
public interface FinanceTransportMapper extends BaseMapper<FinanceTransport> {

    BigDecimal getUnPayTransportFeeByOrderId(@Param("orderId") Long orderId);

    FinanceTransport getByOrderIdAndTransportId(@Param("orderId") Long orderId, @Param("transportId") Long transportId);

    void deleteByTransportIdAndOrderId(@Param("transportId") Long transportId, @Param("orderId") Long orderId);

    @Delete("delete from tt_finance_transport where transport_id = #{transportId}")
    void deleteByTransportId(@Param("transportId") String id);

    List<FinanceTransport> getPaymentTransportListByOrderId(@Param("orderId") String orderId,@Param("tenantId") Long tenantId);
}